<script setup>
const {safeAreaInsets}=uni.getSystemInfo()
let safePaddingTop = safeAreaInsets?.top +30


</script>
<template>
  <view class="header" :style="{paddingTop: safePaddingTop +'px'}">
    <!-- logo栏 -->
     <view class="logo">
      <image
        class="logo-image"
        src="@/static/images/logo.png"
      />
      <text class="logo-text">新鲜 ~ 亲民 ~ 快捷</text>
     </view>
     <!-- 搜索栏 -->
     <view class="search">
      <text class="icon-search">搜索商品</text>
      <text class="icon-scan"></text>
     </view>
  </view>
</template>
<style lang="scss">
.header{
  background-image: url('@/static/images/navigator_bg.png');
  background-size: cover;
  position: relative;
  display: flex;
  flex-direction: column;
  padding-top: 100px;
  .logo{
    display: flex;
    height: 64rpx;
    align-items: center;
    padding-left: 30rpx;
    padding-top: 20rpx;
    .logo-image{
      width: 166rpx;
      height: 39rpx
    }
    .logo-text{
      flex: 1;
      line-height: 28rpx;
      font-size: 26rpx;
      color: white;
      margin: 2rpx 0 0 30rpx;
      padding-left: 30rpx;
      border-left: 2px solid white;
    }
  }
  .search{
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10rpx 0 26rpx;
    height: 64rpx;
    margin: 16rpx 20rpx;
    background-color: rgba($color: #fff, $alpha: 0.5);
    border-radius: 32rpx;
    color: #fff;
    font-size: 28rpx;
    .icon-search{
      &::before{
        margin-right: 10rpx;
      }
    }
    .icon-scan{
      font-size: 30rpx;
      padding: 15rpx;
    }
  }
  
  }

</style>